//
//  adaboost.gen.c
//  FastPRDemo
//
//  Created by fanwenjie on 2017/6/5.
//  Copyright © 2017年 fanwenjie. All rights reserved.
//


const static short windowWidth = 44;
const static short windowHeight = 14;

#define INT_MIN 0x80000000


typedef struct {
    unsigned int isReject[8];
    int weight[2];
    int stageThreshold;
    Rect feature;
}Classifier;

const static Classifier classifiers[] =
{
    {{0xFBDFFBDF, 0xD1DBD0FF, 0xD907D0CF, 0xFDEFF3DF, 0xD5CBF0FB, 0xF1018083, 0xE1CFFF8F, 0xFFFFFFFF } ,{-59135, 48521 }, INT_MIN ,{9, 3, 3, 3 }},
    {{0xDBCFF9CE, 0xFD46906A, 0xC940C0C2, 0xFBAFCACC, 0xF703E3EA, 0x40828088, 0xF5CBFABE, 0xF3EFFFBF } ,{-51593, 41736 }, INT_MIN ,{2, 5, 1, 2 }},
    {{0xFBEFF9CA, 0xF58F90E0, 0xD0039000, 0xD78F5013, 0xC28AF1AC, 0x41110001, 0x4103A08A, 0x77EFF1DF } ,{-53456, 39662 }, -71067 ,{34, 4, 1, 3 }},
    {{0x110011F9, 0xF9120210, 0x1D0091FF, 0xDF110480, 0x8088A0FF, 0xF9800088, 0x8A0088BB, 0xBF8B0A88 } ,{-57951, 44473 }, INT_MIN ,{4, 1, 9, 1 }},
    {{0x10001010, 0xDD100010, 0x1501D5DF, 0xDF511199, 0xC80088BD, 0xF9A000B8, 0x9988B9BF, 0xBB100088 } ,{-53886, 43623 }, INT_MIN ,{17, 11, 8, 1 }},
    {{0xF1D3FFFE, 0xD1FBD0EF, 0xF68DFF85, 0xFBEFF3FF, 0xF185B1FB, 0x70C301A1, 0xFF9FFFFF, 0xF7FFFBFF } ,{-48187, 49438 }, INT_MIN ,{9, 1, 3, 4 }},
    {{0x000011D4, 0x3D801010, 0x0510899D, 0xDD105194, 0x00088AB8, 0xB9880088, 0x0B0808FF, 0x3B8810A8 } ,{-51061, 45881 }, -114145 ,{2, 0, 13, 1 }},
    {{0xFFDFF7FF, 0xDFF7C15B, 0xF70E808E, 0xFF27C6CF, 0xE9A9E1FF, 0xF0F8C3BB, 0xF54DF3FF, 0xFFFFFBFF } ,{-55538, 45769 }, INT_MIN ,{3, 4, 2, 3 }},
    {{0xB08080F0, 0xD5511156, 0x5110C7BF, 0xF51521F5, 0xA01089FA, 0xFD908880, 0x9A0888FB, 0xAF800100 } ,{-52764, 41335 }, INT_MIN ,{4, 11, 9, 1 }},
    {{0x000090F0, 0xDF5700D9, 0x350112DF, 0x5F59000B, 0x900AA9DA, 0xFBFA0888, 0x28098AAB, 0x8BBB022B } ,{-48211, 43028 }, INT_MIN ,{0, 1, 14, 2 }},
    {{0xD3CBF8EA, 0xC0CBB0AA, 0x540252A2, 0x71532030, 0x800540E8, 0x45230081, 0x4247C4D3, 0xF7AFE9BF } ,{-47256, 43498 }, -113017 ,{27, 4, 1, 2 }},
    {{0xF7DFFFFF, 0xD0D7FFFF, 0xFFEFDF8F, 0xFFEFFFFF, 0xF3FFE3FF, 0xF1D7D6FF, 0xFBFFFFBF, 0xFFFFFFFF } ,{-57556, 40890 }, INT_MIN ,{9, 2, 3, 3 }},
    {{0xF3FFF24E, 0xC2DFE2BE, 0xC0C3E444, 0xE2CFDAEF, 0xEF4FF24B, 0x617F92A5, 0xF96FD30E, 0xF0FFFFEF } ,{-53057, 31349 }, INT_MIN ,{4, 2, 1, 3 }},
    {{0xFFFFE782, 0x9479F10A, 0xD306E000, 0xC3C5F287, 0xFBEFF202, 0x0104DB15, 0xFB6F4006, 0xF767F657 } ,{-48901, 38834 }, -75109 ,{41, 1, 1, 4 }},
    {{0xF175F5F7, 0xF7FF71D7, 0xF5DFF7FF, 0xFFFFD3FB, 0xFBFBFBFF, 0xFBFBD1FB, 0xEACFAEAF, 0xFFFFBBAF } ,{-53833, 32199 }, INT_MIN ,{2, 1, 3, 2 }},
    {{0xF7EFFB46, 0xC7EFCBC7, 0xCBCBD944, 0xDFFFEFEF, 0x732FF767, 0x71BFF3B7, 0xD3337353, 0x777FF7EF } ,{-56696, 22335 }, INT_MIN ,{5, 2, 1, 3 }},
    {{0xD1FFF3CE, 0x71FFF3D6, 0xF1568186, 0xF7FFF1C7, 0xF4D3F7FA, 0x50417052, 0xFE6FFFFB, 0x77FFF7AF } ,{-50726, 29423 }, INT_MIN ,{23, 1, 2, 4 }},
    {{0x24680DBC, 0xFD7473FC, 0xFFDE9FFF, 0x97F029B8, 0x3AF97FFF, 0xED09F8B8, 0xFFCFFBFF, 0xBFBC08F0 } ,{-48222, 33671 }, INT_MIN ,{6, 0, 8, 1 }},
    {{0x7FD3DFDF, 0xDCFD79F7, 0xE1DFD9EE, 0xFDCFB9DF, 0xF259717F, 0x70707090, 0xFF97C09F, 0xF7BFFFFF } ,{-42123, 39903 }, -92419 ,{7, 3, 4, 3 }},
    {{0xFFFFFFFF, 0xBBFEF7DF, 0xDF7EFDFE, 0xFFFEFFFE, 0xFBDFFFFF, 0x7DFFFEFF, 0xFFFFFBFF, 0xFFFFFBFF } ,{-56253, 17657 }, INT_MIN ,{1, 7, 2, 2 }},
    {{0xF3FFFDFF, 0xD1F3D8FF, 0xFECFBBCC, 0xF5EFFFDF, 0xF5C5F5FB, 0x70A5361F, 0xFFDFFFDF, 0xF3FFFFFF } ,{-49480, 24902 }, INT_MIN ,{9, 2, 3, 4 }},
    {{0x01B827D7, 0x5F757F59, 0xEF5FBFFF, 0x3FFF77FA, 0x1C4C3AFD, 0xFFC5E98D, 0x3BFEBDFF, 0xDFF90E80 } ,{-38751, 37013 }, INT_MIN ,{0, 1, 11, 1 }},
    {{0xDDFFAFFF, 0xEABA3EFE, 0xFF6CAFCC, 0xEAE8FBFE, 0x53CF7AFF, 0x3EFE7FBF, 0x6FFE4FCE, 0xEDFFFFEF } ,{-46344, 33123 }, INT_MIN ,{0, 7, 2, 2 }},
    {{0x11001208, 0x5FB5BBFF, 0xF9F077FD, 0xF5F5D5FD, 0xBD58AFBD, 0xFFDDB9FD, 0x28FDFFFE, 0x3DC80C00 } ,{-49614, 27873 }, -90297 ,{7, 11, 12, 1 }},
    {{0xFFF7FDFF, 0xFFACD9BD, 0xBFB79FBF, 0xDFBFDDFF, 0xD9DCFDFF, 0xFCFCF499, 0xFFFDCDDF, 0xFFFDDDFF } ,{-55682, 17549 }, INT_MIN ,{2, 5, 3, 3 }},
    {{0xD7DFFFEE, 0xD7F5E3CF, 0xC10EDE46, 0x53CFE7EF, 0xF7CDD5CB, 0x51E3C1D1, 0xFFF7F3DF, 0x75FFF7EF } ,{-52387, 16270 }, INT_MIN ,{34, 1, 2, 4 }},
    {{0xE2FFEF20, 0xF5FFFFDF, 0xFED3F7CF, 0xFFFFE2EF, 0xDADFEFBF, 0xECBFFFFF, 0xF07FFFFF, 0x64FFEFAA } ,{-52835, 21450 }, INT_MIN ,{1, 0, 2, 3 }},
    {{0xDFCFF75C, 0xBEC3DADE, 0xFDDEF75C, 0x8FEBF5BF, 0xFD9EFBDC, 0x8FFDEBFD, 0xFFE7FFDD, 0xAF5FFFFF } ,{-48185, 26879 }, INT_MIN ,{0, 2, 5, 4 }},
    {{0xE7EFF7EE, 0xE2CFF2EB, 0xC9CFE6C0, 0xD3FFFBDF, 0xE1CFE1C3, 0x002160B2, 0xC4EFBE96, 0x51FFF3DB } ,{-49308, 27936 }, -114677 ,{19, 3, 1, 3 }},
    {{0xFFFFFFFF, 0xFF9FD1FF, 0xF5BFCFDF, 0xDF8FF6DF, 0xF1FFF1FF, 0xFCFC30FD, 0xFEAFFDFF, 0xFFBFFDFF } ,{-52754, 30720 }, INT_MIN ,{2, 4, 3, 3 }},
    {{0x32553D3D, 0xFB373DDD, 0xDD530DFF, 0xFFFFCDB3, 0xA7FEAFBE, 0xF9D7FAFD, 0xBCE98A8C, 0xBEFF025D } ,{-44130, 26024 }, INT_MIN ,{2, 1, 3, 1 }},
    {{0xEDFBFFFA, 0x8ACED5E8, 0xFFFF76FE, 0x1F946E38, 0x6B9C8BBC, 0x6340BFD6, 0x3DF575FF, 0x5FCD67FF } ,{-55624, 19602 }, INT_MIN ,{27, 5, 1, 3 }},
    {{0x834F110A, 0x735FF0CF, 0x664B5F12, 0xF7FFD316, 0xFFEDBBFF, 0x30D712E3, 0xF7BFFFEF, 0xE7BBEEEF } ,{-44240, 26560 }, INT_MIN ,{30, 0, 3, 3 }},
    {{0xF0F7F84A, 0xD48AF428, 0xFEE7F4A2, 0x7316DBB7, 0xF5C4C8CA, 0x4073EA4E, 0xD0CF91BB, 0xF62BFEBF } ,{-41381, 30078 }, -96517 ,{22, 4, 1, 2 }},
    {{0xF9FFBBFF, 0xFFFFF3B7, 0xF195B1FF, 0xF3F3FBFF, 0xFCDFFDFF, 0xFF999EC9, 0xF9DFFFFF, 0xFF5DBFFF } ,{-52260, 21211 }, INT_MIN ,{21, 10, 3, 1 }},
    {{0xEEEEEEFF, 0xFDF7F5FF, 0xFCFB7D7F, 0xFFD7A763, 0xCCFFFFFF, 0xFAFBBDBB, 0xA7DBFB2F, 0xF7F7F737 } ,{-40832, 30696 }, INT_MIN ,{0, 0, 2, 3 }},
    {{0xF7E3F2FB, 0xC0EBF2B2, 0x4E0BFF0F, 0xD06EF7AF, 0xFF59F185, 0xB0F3F1D3, 0xCF37FD0F, 0xDFDFFFDF } ,{-40283, 29258 }, INT_MIN ,{11, 3, 2, 3 }},
    {{0xEEEFFBF6, 0xFFFFCEEE, 0x8EB3F0D0, 0xDD8F6DDF, 0x9EFDDEFE, 0x565FD7ED, 0x2CA7CEFF, 0x7BEFD3FF } ,{-35991, 32782 }, INT_MIN ,{26, 5, 1, 3 }},
    {{0xF5FBBC7A, 0xF9F5F0FD, 0x551F5FF5, 0xD5FFAAED, 0xFBF19BFA, 0xDBFBFB9B, 0xBFBBFBBE, 0x7707F57A } ,{-38947, 30731 }, INT_MIN ,{12, 1, 1, 4 }},
    {{0x16C0177C, 0xF7685D5D, 0xFF94F9FD, 0xFFBFF75A, 0x95FFF9DC, 0xBF74ABFC, 0x3D8D36FD, 0xAFB80088 } ,{-43628, 29417 }, -113490 ,{14, 0, 6, 1 }},
    {{0xFFDFFFFF, 0xFFBAFDFC, 0xD3F8FFFD, 0xFFBFBBFD, 0xFF7FFFFF, 0xBFAFC9CF, 0x2CFC5BFD, 0xFFFFFFFF } ,{-52709, 17246 }, INT_MIN ,{28, 8, 1, 2 }},
    {{0xFF37BFBF, 0xDFA7E0BF, 0xBFCAD3FF, 0xDFBEFABF, 0xCADFACFF, 0xCEFCD0F4, 0xFC9900CF, 0xDD5DD5DF } ,{-39732, 29945 }, INT_MIN ,{2, 7, 3, 2 }},
    {{0xF7FFFBBF, 0x80E6F2B2, 0x8E446D0F, 0xCDCCF94A, 0xFA3B7792, 0xB07FF0B2, 0xFF3DFE4F, 0xFFFFFFFF } ,{-36418, 31091 }, INT_MIN ,{11, 2, 2, 3 }},
    {{0x5113C3CF, 0x777FB627, 0x7771FDFF, 0x75DF6D5E, 0x556FAB8E, 0x1A450008, 0x39FFEBFF, 0x1BFFBAAB } ,{-41579, 27790 }, INT_MIN ,{28, 0, 3, 2 }},
    {{0xFD7BCE0A, 0xFBB2EFDF, 0xEBEFC541, 0xFFDFCBD7, 0xFF7F874F, 0xC7E78A3F, 0xDE7FDF88, 0x537FDE1B } ,{-42226, 26465 }, INT_MIN ,{23, 1, 1, 3 }},
    {{0xFCAFEFFE, 0xBFAEF73E, 0xC74E82D6, 0xB992273E, 0x397C86CC, 0x3FB158FC, 0x3AAE6FFC, 0x7FBBFFF7 } ,{-42239, 27556 }, INT_MIN ,{7, 8, 1, 2 }},
    {{0xFFFFF2B8, 0xFFCBB8CF, 0xD2EE3118, 0x7B67F7BE, 0xEB9CACF8, 0x4243C022, 0xBB27D730, 0x7707FF71 } ,{-50533, 21050 }, -98455 ,{38, 5, 2, 3 }},
    {{0xDFFFFFDF, 0xFAFFFED7, 0xFDDFFB1F, 0xFB7FEBFF, 0xFBFFFEFF, 0xF3EBF3BF, 0xEF7FDF1F, 0xFFFFFFFF } ,{-52835, 15022 }, INT_MIN ,{4, 3, 1, 2 }},
    {{0xCBDFA29F, 0xFFED1F2F, 0x149C3CFF, 0xFFDC3F32, 0xB5BEB5FF, 0xFF4EF0EE, 0xA558C0FF, 0xBD28F4FF } ,{-40835, 25721 }, INT_MIN ,{1, 8, 3, 2 }},
    {{0xFFDFFF28, 0xFF9FF9BF, 0x9F5EEF10, 0x7FFBE9BF, 0xE3FBFA00, 0x0A379C9F, 0xF64BFF54, 0xFFFFFFFF } ,{-37632, 27799 }, INT_MIN ,{41, 11, 1, 1 }},
    {{0xEDFF5500, 0xFDFFAB3F, 0x7737571F, 0xFDFB733F, 0xEEBFFDBA, 0x40FFC5F8, 0x12FFBD3B, 0xE2FFFA7F } ,{-42543, 24910 }, INT_MIN ,{3, 0, 4, 3 }},
    {{0xFF7FFFFC, 0x435FD75D, 0x3B553BF4, 0x7F91DB5B, 0xF8F9DFBC, 0x0B4AFEDC, 0x7FF5B4FB, 0x3F77BFDB } ,{-44959, 26169 }, INT_MIN ,{26, 8, 2, 2 }},
    {{0xDF223914, 0xFF74BBBC, 0xB553FFF5, 0xFF9DD697, 0x79ECFFDF, 0xF9C1CA1D, 0xBEB4BAFE, 0xA85C3A0C } ,{-39302, 26663 }, INT_MIN ,{20, 11, 5, 1 }},
    {{0xFFCFFFC8, 0x4FCE30A6, 0xE60CC5B3, 0xCF86DF9E, 0xE4C9F4D5, 0x3341A4A0, 0xA542F6BF, 0xDF5DF7FF } ,{-40918, 25632 }, -99953 ,{31, 2, 2, 4 }},
    {{0xFFFFFAFF, 0xF73FF7DF, 0xBB8BDFFF, 0xF353F3FF, 0xF2DFF0EB, 0xFFFBBB9B, 0xF0F2F0FF, 0xFBFFFFDF } ,{-50133, 31247 }, INT_MIN ,{3, 6, 1, 1 }},
    {{0xFBEFEFAA, 0x6FEFFEEF, 0xDFFBFF82, 0xF1EFFEEB, 0xFAFFF3C0, 0x413E9789, 0xF3FFF3E3, 0x77FFF3FF } ,{-53405, 9624 }, INT_MIN ,{5, 8, 1, 1 }},
    {{0xF2F3D741, 0xF060D3F4, 0x828E7F87, 0xCFADE6A7, 0x7075F561, 0xF0F645B2, 0xAF57FE75, 0xFF77FFB7 } ,{-42422, 20672 }, INT_MIN ,{10, 1, 2, 4 }},
    {{0xFBFFB3F4, 0xBF9E23AE, 0x03AE3478, 0x1FEE32A0, 0xFFECB3B0, 0x9F6FAE95, 0x5EB525D4, 0xFFDFFFBF } ,{-36291, 27708 }, INT_MIN ,{18, 8, 1, 2 }},
    {{0xDF7F7FAE, 0x57B7F6A3, 0xFD2EFDDF, 0xF9BDFBF3, 0xFFDBDFFD, 0xEDB9AFB9, 0xF9E9AAFB, 0x404FE1FA } ,{-38907, 26818 }, INT_MIN ,{0, 0, 3, 4 }},
    {{0xFAEFF7FE, 0xBD21C8A0, 0x82EEF0CA, 0x7DAEDED7, 0x3B9E78CA, 0x733F4509, 0x00F7C4EF, 0xD7EFF6BF } ,{-33358, 31039 }, INT_MIN ,{26, 4, 1, 2 }},
    {{0x2ACC077E, 0xFB6075FE, 0x5132B9B4, 0xB3F8AF6E, 0x0B9BADFF, 0xDB1FBBCB, 0xA30CBBF8, 0x8FDC02F0 } ,{-43509, 22720 }, -107506 ,{32, 0, 3, 1 }},
};

const static unsigned int features[][4] = {
    {9, 3, 3, 3},
    {2, 5, 1, 2},
    {34, 4, 1, 3},
    {4, 1, 9, 1},
    {17, 11, 8, 1},
    {9, 1, 3, 4},
    {2, 0, 13, 1},
    {3, 4, 2, 3},
    {4, 11, 9, 1},
    {0, 1, 14, 2},
    {27, 4, 1, 2},
    {9, 2, 3, 3},
    {4, 2, 1, 3},
    {41, 1, 1, 4},
    {2, 1, 3, 2},
    {5, 2, 1, 3},
    {23, 1, 2, 4},
    {6, 0, 8, 1},
    {7, 3, 4, 3},
    {1, 7, 2, 2},
    {9, 2, 3, 4},
    {0, 1, 11, 1},
    {0, 7, 2, 2},
    {7, 11, 12, 1},
    {2, 5, 3, 3},
    {34, 1, 2, 4},
    {1, 0, 2, 3},
    {0, 2, 5, 4},
    {19, 3, 1, 3},
    {2, 4, 3, 3},
    {2, 1, 3, 1},
    {27, 5, 1, 3},
    {30, 0, 3, 3},
    {22, 4, 1, 2},
    {21, 10, 3, 1},
    {0, 0, 2, 3},
    {11, 3, 2, 3},
    {26, 5, 1, 3},
    {12, 1, 1, 4},
    {14, 0, 6, 1},
    {28, 8, 1, 2},
    {2, 7, 3, 2},
    {11, 2, 2, 3},
    {28, 0, 3, 2},
    {23, 1, 1, 3},
    {7, 8, 1, 2},
    {38, 5, 2, 3},
    {4, 3, 1, 2},
    {1, 8, 3, 2},
    {41, 11, 1, 1},
    {3, 0, 4, 3},
    {26, 8, 2, 2},
    {20, 11, 5, 1},
    {31, 2, 2, 4},
    {3, 6, 1, 1},
    {5, 8, 1, 1},
    {10, 1, 2, 4},
    {18, 8, 1, 2},
    {0, 0, 3, 4},
    {26, 4, 1, 2},
    {32, 0, 3, 1},
};
